import http from '../../../http/http';
import { useEffect } from 'react';
import { View, Text, Image} from '@tarojs/components'

import './MyCollection.less'
// 文字图标
import { AtIcon } from 'taro-ui'
import "taro-ui/dist/style/components/icon.scss";
// 路由的push
import Taro from '@tarojs/taro'
function MyCollection() {
  // 历史表数据
  const orderlist = [
    {
      itme: '2021-4-5',
      src:[
       'https://img0.baidu.com/it/u=3115697468,4138261976&fm=26&fmt=auto&gp=0.jpg',
        'https://img0.baidu.com/it/u=3394076110,826772843&fm=26&fmt=auto&gp=0.jpg',
       'https://img0.baidu.com/it/u=3115697468,4138261976&fm=26&fmt=auto&gp=0.jpg',
       'https://img0.baidu.com/it/u=3115697468,4138261976&fm=26&fmt=auto&gp=0.jpg',
       'https://img0.baidu.com/it/u=3115697468,4138261976&fm=26&fmt=auto&gp=0.jpg',
       'https://img0.baidu.com/it/u=3115697468,4138261976&fm=26&fmt=auto&gp=0.jpg',
      ]
    },
    {
      itme: '2021-4-4',
      src:[
       'http://t13.baidu.com/it/u=2617907749,2143422043&fm=224&app=112&f=JPEG?w=500&h=500&s=32A8F1070A7345BD4FA835DA0300C0B0',
        'http://t13.baidu.com/it/u=2617907749,2143422043&fm=224&app=112&f=JPEG?w=500&h=500&s=32A8F1070A7345BD4FA835DA0300C0B0',
       'http://t13.baidu.com/it/u=2617907749,2143422043&fm=224&app=112&f=JPEG?w=500&h=500&s=32A8F1070A7345BD4FA835DA0300C0B0',
       'http://t13.baidu.com/it/u=2617907749,2143422043&fm=224&app=112&f=JPEG?w=500&h=500&s=32A8F1070A7345BD4FA835DA0300C0B0',
       'http://t13.baidu.com/it/u=2617907749,2143422043&fm=224&app=112&f=JPEG?w=500&h=500&s=32A8F1070A7345BD4FA835DA0300C0B0',
       'http://t13.baidu.com/it/u=2617907749,2143422043&fm=224&app=112&f=JPEG?w=500&h=500&s=32A8F1070A7345BD4FA835DA0300C0B0',
      ]
    },
    {
      itme: '2021-4-3',
      src:[
       'http://t15.baidu.com/it/u=2293700299,486387393&fm=224&app=112&f=JPEG?w=500&h=500&s=0C80AF5DC103675D5B1C106A0300A055',
        'http://t15.baidu.com/it/u=2293700299,486387393&fm=224&app=112&f=JPEG?w=500&h=500&s=0C80AF5DC103675D5B1C106A0300A055',
       'http://t15.baidu.com/it/u=2293700299,486387393&fm=224&app=112&f=JPEG?w=500&h=500&s=0C80AF5DC103675D5B1C106A0300A055',
       'http://t15.baidu.com/it/u=2293700299,486387393&fm=224&app=112&f=JPEG?w=500&h=500&s=0C80AF5DC103675D5B1C106A0300A055',
       'http://t15.baidu.com/it/u=2293700299,486387393&fm=224&app=112&f=JPEG?w=500&h=500&s=0C80AF5DC103675D5B1C106A0300A055',
       'http://t15.baidu.com/it/u=2293700299,486387393&fm=224&app=112&f=JPEG?w=500&h=500&s=0C80AF5DC103675D5B1C106A0300A055',
      ]
    },

  ]
  const orderlisthan=()=>{
    let arr=[];
      for(let i=0;i<orderlist.length;i++){
          arr.push(
            <View className="W_F_orderlist">
              <Text className="W_F_ordertime">{orderlist[i].itme}</Text>
              <View className="W_F_orderimg">
                    {orderlist[i].src.map((v,i)=>{
                      return(
                        <Image id="W_F_orderimage" src={v}/>
                      )
                    })}
              </View>
          </View>
          )  
      }
      return arr
  }
  // 返回页面
  const W_F_fanhui=()=>{
    Taro.switchTab({
      url: '/pages/mine/mine'
    })
  }
  return (
    <View className="W_F_box">
      {/* <View onClick={W_F_fanhui} className='at-icon at-icon-chevron-left W_F_fanhui'></View> */}
      <View className="W_F_mywodeshoucang">
        <Text className="W_F_t1">我的收藏</Text>
        <View>
          <Text></Text>
          <Text className="W_F_qingchusuoyou">清除所有</Text>
        </View>
      </View>
      <View>
          {orderlisthan()}
      </View>
    </View>
  )

}

export default MyCollection;